package org.example.domain.repository;

import com.github.pagehelper.PageInfo;
import org.example.domain.model.entity.url.UrlShortenerAccessLogs;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsAccessRecordReq;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsAccessRecordReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsReq;
import org.example.domain.model.entity.url.vo.UrlShortenerAccessLogsVo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface UrlShortenerAccessLogsRepository {
    void insertUrlShortenerAccessLogs(UrlShortenerAccessLogs urlShortenerAccessLogs);

    UrlShortenerAccessLogsVo findPvUvUidStatsByUrlShortener(UrlShortenerStatsReq urlShortenerStatsReq);

    List<HashMap<String, Object>> topIpByUrlShortenerList(UrlShortenerStatsReq urlShortenerStatsReq);

    HashMap<String, Object> findUvTypeByUrlShortenerList(UrlShortenerStatsReq urlShortenerStatsReq);

    PageInfo<UrlShortenerAccessLogs> selectAccessLogsGroupPage(UrlShortenerGroupStatsAccessRecordReq urlShortenerGroupStatsAccessRecordReq);

    List<Map<String, Object>> selectGroupUvTypeByUsers(String gid, String startDate, String endDate, List<String> userAccessLogsList);

    PageInfo<UrlShortenerAccessLogs> selectStatsAccessRecordPage(UrlShortenerStatsAccessRecordReq req);

    List<Map<String, Object>> selectUvTypeByUsers(String gid, String fullShortUrl, Integer enableStatus, String startDate, String endDate, List<String> userAccessLogsList);

    UrlShortenerAccessLogsVo findUrlShortenerAccessLogsVoByGroup(UrlShortenerGroupStatsReq urlShortenerGroupStatsReq);

    List<HashMap<String, Object>> topIpByGroupList(UrlShortenerGroupStatsReq urlShortenerGroupStatsReq);
}
